import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { PrismasqlService } from './prismasql.service';
import { CreatePrismasqlDto } from './dto/create-prismasql.dto';
import { UpdatePrismasqlDto } from './dto/update-prismasql.dto';

@Controller('prismasql')
export class PrismasqlController {
  constructor(private readonly prismasqlService: PrismasqlService) {}

  @Post()
  create(@Body() createPrismasqlDto: CreatePrismasqlDto) {
    return this.prismasqlService.create(createPrismasqlDto);
  }

  @Get()
  findAll() {
    return this.prismasqlService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.prismasqlService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updatePrismasqlDto: UpdatePrismasqlDto) {
    return this.prismasqlService.update(+id, updatePrismasqlDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.prismasqlService.remove(+id);
  }
}
